<?php

class Tab_Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
	protected $_name = 'tab';
	
    
    
	function _initAcl() 
    {
        $registry = Zend_Registry::getInstance();
        $acl = $registry->get('acl');
        $this->_initIndexAcl($registry,$acl);
        $this->_initListAcl($registry,$acl);
	}
    private function _initIndexAcl($registry,$acl)
    {
        $resource_name = $this->_name . ':index';
        $acl->addResource($resource_name);
        $arrGuest = array(  
             'index',
            'indexx'
        );
        $arrUser = array_merge(
                        array( 
                            'display'
                        ), $arrGuest
        );        
        $acl->allow(Core_Role::ROLE_GUEST, $resource_name, $arrGuest);
        $acl->allow(Core_Role::ROLE_USER, $resource_name, $arrUser);		
        $registry->set('acl',$acl);
    }
    private function _initListAcl($registry,$acl)
    {
        $resource_name = $this->_name . ':gift';
        $acl->addResource($resource_name);
        $arrGuest = array(
                'index',
        );
        $arrUser = array_merge(
                        array(					
                                'display',                                                                                                
                        ), $arrGuest
        );        
        $acl->allow(Core_Role::ROLE_GUEST, $resource_name, $arrGuest);
        $acl->allow(Core_Role::ROLE_USER, $resource_name, $arrUser);
        $registry->set('acl',$acl);
    }
    public function _initCache()
    {
        Zend_Controller_Front::getInstance()->setParam('disableOutputBuffering', true);
    }
}

